package com.inspur.dgov.tenant.feign;

import com.inspur.dgov.common.tool.api.R;
import com.inspur.dgov.common.tool.constant.AppConstant;
import com.inspur.dgov.tenant.entity.PubTenant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 租户 Feign接口类
 *
 * @Author chiyupei
 * @Date 19/7/1 下午7:09
 * @Version 1.0
 * @Description 租户 Feign接口类
 */
@FeignClient(value = AppConstant.APPLICATION_TENANT_NAME)
public interface ITenantFeign {

    String API_PREFIX = "/tenant";

    /**
     * 根据租户编码获取租户信息
     *
     * @param tenantCode  租户编码
     * @return
     */
    @GetMapping(API_PREFIX + "/getTenantInfoByCode")
    R<PubTenant> getTenantInfoByCode(@RequestParam("tenantCode") String tenantCode);
}
